﻿//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;

interface IFilter
{
    /* Returnes an ID that is used to identify the
     * plug-in by the server. It must be an integer
     * between 1000 and 5000. Numbers lower then 1000
     * are reserved by other messages handled by the
     * server app.
     **/
    int GetID();

    /* Returnes the version of the plug-in interface,
     * not the version of the plugin.
     * The version for now must be: 1.0.0
     **/
    string GetVersion();

    /* Returnes a string that describes the filter,
     * is not mandatory.
     **/
    string GetDescription();

    /* This method must implement the algorithm that
     * reads the package send by an sensor app. After
     * this method is called the filter must be ready
     * to validate the data received.
     * This method is called by the server app.
     * 
     * PARAMETERS:
     *   data - data to parse
     **/
    void Parse(byte[] data);

    /* This method must implement the algorithm that
     * validate the data processed by "Parse" method.
     * This function is called by the server app.
     * 
     * RETURNES: true if the data is OK, false otherwise.
     **/
    bool Validate();

    /* This method is used to set the functions useful
     * to the filter. The function are provided by
     * the server.
     * 
     * PARAMETERS:
     *   hf - the class that provide the functions;
     **/
    void SetHelperFunctions(/*HelperFunctions hf*/);
}
